package cn.ibdsr.human.thread;

import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

/**
 * @Description 消息队列
 * @Version V1.0
 * @CreateDate 2019/6/14 15:27
 *
 * Date                  Author               Description
 * ------------------------------------------------------
 * 2019-06-14 15:27:00   XuZhipeng               类说明
 *
 */
public class MessageQueue {

    /**
     * 阻塞队列
     */
    public static BlockingQueue<Map<String, Object>> BlockQueue = new ArrayBlockingQueue<Map<String, Object>>(200000);

    public static boolean put(Map<String, Object> map) {
        try {
            BlockQueue.put(map);
        } catch (InterruptedException e) {
            e.printStackTrace();
            return false;
        }
        return true;
    }
}
